<template>
  <el-dialog title="修改课程" :model-value="showEditModel" @close="closed" width="80%">
    <el-form  v-loading="loading" :model="schedule" ref="scheduleRef" label-width="120px" label-position="top">
      <el-form-item label="学年">
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">{{$t('msg.common.save')}}</el-button>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script setup>
import { defineProps, defineEmits, ref } from 'vue'
import { ElMessage } from 'element-plus'

defineProps({
  showEditModel: {
    type: Boolean,
    required: true
  },
  schedule: {
    type: Object,
    required: true
  }
})

const scheduleRef = ref({})

const scheduleRules = ref({
  schoolYear: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  term: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  cycle: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  classDate: [
    {
      required: true,
      trigger: 'change',
      message: '签到类型不能为空'
    }
  ],
  week: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  section: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  address: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  courseName: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  teachContent: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  teacher: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  teachTel: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  teachObject: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  stuNums: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  courseSecretary: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  courseSecretaryTel: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  academicSecretary: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ],
  academicSecretaryTel: [
    {
      required: true,
      trigger: 'blur',
      message: '签到类型不能为空'
    }
  ]
})

const emits = defineEmits(['update:showEditModel', 'update:schedule'])

const closed = () => {
  emits('update:showEditModel', false)
}

const onSubmit = () => {
  ElMessage.success('修改成功')
  // console.log(schedule)
  // emits('update:schedule', this.ref.schedule)
  closed()
}

</script>

<style lang="scss" scope>

</style>
